<#include "./_header.htm"> <!-- Main Header --> <header
	class="main-header">
	<a href="javascript:void(0);" class="logo"> <!-- mini logo for sidebar mini 50x50 pixels -->
		<span class="logo-lg">多维数据分析卫士</span>
	</a>
	<nav class="navbar navbar-static-top" role="navigation">
		<div class="level1-menu">
			<#list Session.firstLevelMenuList as menu>
				<a href="javascript:void(0);" <#if (topModuleCode!"") == "${menu.menuCode}" || (moduleCode!"") == "${menu.menuCode}">class="active"</#if> onclick="jump('${menu.menuCode}','${menu.isJumpManage}','${menu.menuUrl!""}')">
				<#if menu.menuCode=='billanalysis'>
					<img class="title-head" src="${ctx}/imgs/title-icon/bill.png" alt="">
				<#elseif menu.menuCode=='callanalysis'>
					<img class="title-head" src="${ctx}/imgs/title-icon/call.png" alt="">
				<#elseif menu.menuCode=='ElectronicsReport'>
					<span class="glyphicon glyphicon-phone" style="font-size: 17px;top: 4px;" aria-hidden="true"></span>
				<#elseif menu.menuCode=='operations'>
					<img class="title-head" src="${ctx}/imgs/title-icon/sys.png" alt="">
				</#if>
				<span >${menu.menuName}</span>
				</a>
				<#if ((topModuleCode!"") == "${menu.menuCode}" || (moduleCode!"") == "${menu.menuCode}") && secondLevelMenuMap["${menu.menuId}"]?? && (secondLevelMenuMap["${menu.menuId}"]?size > 0)>
					<div class="level2-menu-box">
						<div class="level2-menu openCase">
							<button onclick="chooseCase()" style="background-color: #52a1fe;" type="button" class="btn btn-info ">
								<img class="title-head title-headOpenCase" src="${ctx}/imgs/title-icon/open-casechange.png" alt="">
								打开案件
							</button>
						</div>
						<#list secondLevelMenuMap["${menu.menuId}"] as secondMenu>
							<div class="level2-menu <#if (pModuleCode!"") == "${secondMenu.menuCode}"  || (moduleCode!"") == "${secondMenu.menuCode}">active</#if>">
								<div onclick="jump('${secondMenu.menuCode}','${secondMenu.isJumpManage}','${secondMenu.menuUrl!""}')">
									<#if thirdLevelMenuMap["${secondMenu.menuId}"]?? && (thirdLevelMenuMap["${secondMenu.menuId}"]?size > 0)>
										<span class="haschild">${secondMenu.menuName}</span>
									<#else>
										<span >${secondMenu.menuName}</span>
									</#if>
								</div>
								<#if thirdLevelMenuMap["${secondMenu.menuId}"]?? && (thirdLevelMenuMap["${secondMenu.menuId}"]?size > 0)>
									<ul>
										<#list thirdLevelMenuMap["${secondMenu.menuId}"] as thirdMenu>
											<li onclick="jump('${thirdMenu.menuCode}','${thirdMenu.isJumpManage}','${thirdMenu.menuUrl!""}')">${thirdMenu.menuName}</li>
										</#list>
									</ul>
								</#if>
							</div>
						</#list>
					</div>
				</#if>
			</#list>
		</div>
		<div class="navbar-custom-menu">
			<ul class="nav navbar-nav">
				<li class="dropdown user user-menu">
					<a href="#" class="dropdown-toggle" onclick="openInfo()">
						<span class="hidden-xs">欢迎：${loginUser.nickName!}</span>
						<span class="glyphicon glyphicon-triangle-top" aria-hidden="true" id="icon_t"></span>
					</a>
				</li>
				<div class="user-info">
					<ul class="pass">
						<li class="user-info-item"  onclick="resetForm.form()">
							<a href="#">
								<span id="changePass_icon" class="glyphicon glyphicon-wrench" aria-hidden="true"></span>修改密码
							</a>
						</li>
						<!--<li class="user-info-item" onclick="getCurrentVersion()">
							<a href="#">
								<span  class="glyphicon glyphicon-refresh" aria-hidden="true"></span>版本升级
							</a>
						</li>-->
						<li class="user-info-item" onclick="window.location.href='${ctx}/logout'">
							<a href="#">
								<span id="changePass_icon" class="glyphicon glyphicon-off"   aria-hidden="true"></span>退出
							</a>
						</li>
					</ul>
				</div>
			</ul>
		</div>

		<#if !Session["caseId"]?exists && Session["pModuleCode"]!="operations">
			<div class="level2-menu-box" style="position: fixed; top: 68px;">
				<div class="level2-menu ">
					<button onclick="chooseCase()" style="background-color: #52a1fe;" type="button" class="btn btn-info ">
						<img class="title-head" src="${ctx}/imgs/title-icon/open-casechange.png" alt="">
						打开案件
					</button>
				</div>
			</div>
		</#if>
	</nav>
</header>
<script type="text/javascript">
	function openInfo() {
		$(".user-info").show();
	}

	var resetForm = {
		form : function() {
			var title = '修改密码';
			base.getView({
				url:"${ctx}/platManager/modifyPassWordJump",
				success:function(result){
					bootbox.dialog({
						title:title,
						message:result,
						size:"large",
						buttons:{
							cancel:{
								label:"取消",
								className:"btn btn-secondary"
							},
							sure:{
								label:"确定",
								className:"btn btn-primary",
								callback:function() {
									if ($("#resetFormID").valid()) {
										// 验证通过
										var currentPassword = $(":input[name='currentPassword']").val();
										var verificationPassed = false;
										$.ajax({
											url : "${ctx}/platManager/validateCurrentPassword",
											type : 'post',
											dataType : 'json',
											async : false,
											data : {"currentPassword":currentPassword},
											success : function(data) {
												console.log(JSON.stringify(data));
												if(data.result == "success"){
													console.log("data.result="+data.result);
													verificationPassed = true;
												} else {
													$("#renderingPrompt").val(0);
													$("#resetFormID").valid();
													$("#renderingPrompt").val(1);
												}
											}
										});
										if (verificationPassed) {
											$("#resetFormID").submit();
										}
									} else {
										console.log("验证不通过 ... ");
									}
									return false;
								}
							}
						}
					})
				}
			})
		}
	}

	function jump(menuCode,isJump,url){
		if(menuCode == 'casemanage'){
			chooseCase();
		}else if(menuCode == 'billManager'){
			window.open ('${ctx}'+url);
		}else{
			if(isJump && url){
				window.location.href='${ctx}'+url;
			}
		}
	}

	$(document).ready(function(){
		if($(".level2-menu-box").length==0){
			$(".content-wrapper").css("padding-top","67px");
		}
	});

	function chooseCase() {
		base.getView({
			url:"${ctx}/casemanage/list",
			success:function(result){
				bootbox.dialog({
					message:result,
					size:"large",
					boxCss:{"width":"1270px"},
					closeButton : false,
				})
			}
		});
	}
</script>
<style>
	#currentVersion,#newVersion,#downAddr{
		padding-left: 10px;
	}
	#hidebg-up {
		position:absolute;
		left:0px;
		top:0px;
		background-color:#000;
		width: 100%;
		height: 100%;
		filter:alpha(opacity=65);
		opacity:0.65;
		display:none;
		z-Index:2;
	}
	#hidebox-up {
		text-align: right;
		position: absolute;
		width: 100%;
		height: 0%;
		top: 245px;
		border-radius: 5px;
		background-color: #fff;
		display: none;
		z-Index: 9999;
	}
	.modal-dialog-up {
		width: 310px!important;
	}
	.modal-content.modal-content-up {
		border-radius: 4px;
	}
	.Version {
		font-size: 15px;
		margin-bottom: 10px;
		padding-left: 15px;
	}
	#myModalLabel {
		margin-top: 11px;
		font-size: 20px;
		text-align: center;
		color: white;
	}
	.modal-headerTip {
		background-color: #4695ED;
		border-radius: 4px 4px 0 0;
	}
	.modal-headerTip .close {
		margin-top: -17px;
		margin-right: -14px;
	}
	button.close {
		font-size: 30px;
		font-weight: 400;
	}
	.UpgradeStep {
		font-size: 16px;
		margin-bottom: 10px;
		margin: 20px 0 10px 0;
	}
	input.nowLoadButton {
		font-size: 14px;
		height: 34px;
		width: 85px;
		margin-left: 16px;
		background-color: #4695ED;
		color: white;
		border: transparent;
		border-radius: 3px;
	}
	button.btnNowUpdate {
		background-color: #4695ED;
		border-color: transparent;
		color: white;
		width: 280px;
		height: 35px;
		border-radius: 2px;
	}
	.UpgradeStep-tip {
		margin-left: 15px;
	}
	span.UpgradeStep-first,.UpgradeStep-seconed {
		width: 6px;
		height: 6px;
		background-color: #4695ED;
		border-radius: 50%;
		display: inline-block;
		margin-right: 10px;
	}
	.UpgradeStep-seconed {
		background-color: #EF1B25;
	}
	.progress {
		width: 75%;
		margin: 0 auto;
		height: 16px;
		background-color: #ddd;
		margin-top: 25PX;
		display: none;
	}
	element.style {
		background-color: #4595EC;
	}
	.level2-menu:hover span {
		color: #52A1FE;
	}
	.content{
		padding: 25px;
	}
	.changePass_icon{
		color: #CCCCCC;
		font-size: 16px;
	}
	.pass a{
		color:#333;
	}
	.pass a:hover{
		color: #4595ec;
	}
	#icon_t{
		padding-left: 6px;
		font-size: 10px;
		transition: .3s;
	}
	.navbar-nav:hover #icon_t{
		transform-origin:center!important;
		transform: rotate(180deg);

	}
	button.btn.btn.btn-primary {
		background-color: #4595ec;
		border-color: #4595ec;
	}
	input.form-control:focus {
		border-color: #4595ec;
	}
	input.form-control {
		border-radius: 4px;
	}
	.navbar-nav:hover .user-info{
		visibility:visible ;
	}
	.pass{
		padding-left: 0px;
		position: relative;
	}
	.user-info-item{
		font-size: 14px;
		color:black;
		line-height:40px;
	}
	.user-info-item  span{
		padding: 0px 13px;
	}
	.user-info{
		visibility:hidden;
		position: fixed;
		top: 56px;
		z-index: 99999;
		width: 150px;
		height: 120px;
		right: 20px;
		display: flex;
		flex-direction: column;
		background: #fbfbfb;
		box-shadow: 1px 1px 7px #ccc;
		border-radius:5px;
	}
	.user-info-item:hover{
		background: #f5f5f5;
		border-radius:5px;
	}
	.main-header{
		height: 67px;
	}
	.skin-blue .main-header .logo {
	  	background-color: #1b1f2b;
	  	border-bottom: none;
	  	font-weight: bold;
	  	height: 67px;
	 	line-height: 67px;
	  	width:220px;
	  	border-right:solid 1px #383c48;
	}
	.skin-blue .main-header .logo:hover {
	  	background-color: #1b1f2b;
	}
	.skin-blue .main-header .navbar{
		margin-left:220px;
	    background-color: #1b1f2b;
	}
	.level1-menu{
		float:left;
	}
	.level1-menu a{
		width: 140px;
	    line-height: 67px;
	    font-size: 14px;
	    color: #fff;
	    font-family: 微软雅黑;
	    display: block;
	    float: left;
	    text-align: center;
	}
	.level1-menu a:hover {
		background-color: #181b22;
	}
	.level1-menu a.active {
		background-color: #181b22;
	}
	.skin-blue .main-header .navbar .nav > li > a{
		line-height: 37px;
	}
	.content-wrapper{
		/* padding-top: 67px; */
		padding-top: 115px; 
		margin-left:0px;
	}
	.level2-menu-box{
		height:60px;
		width:100%;
		display:block;
		background-color:#f2f6f8;
		position:fixed;
		top:67px;
		left:0px;
		z-index:999;
		box-shadow: 0px 5px 3px #e1e7ea;
	}
	.level2-menu.openCase {
		width: 190px;
		height: 55px;
		line-height: 60px;
	}
	.level2-menu {
		float: left;
		height: 55px;
		font-size: 12px;
		font-family: 微软雅黑;
		line-height: 60px;
		width: 140px;
		text-align: center;
		cursor: pointer;
	}
	button.btn.btn-info {
		width: 173px;
		height: 43px;
		margin-left: 23px;
		font-size: 15px;
	}
	img.title-head.title-headOpenCase {
		margin-left: -5px;
		width: 25px;
		height: 25px;
	}
	.level2-menu div{
		height: 45px;
		display: block;
	}
	.level2-menu span.haschild{
		background:url(${ctx}/imgs/arrow-down.png) center right no-repeat;
		padding-right:13px;
	}
	.level2-menu.active span{
		color:#4695ed;
	}
	.level2-menu.active span.haschild{
		background:url(${ctx}/imgs/arrow-down-active.png) center right no-repeat;
	}
	.level2-menu ul{
	    position: absolute;
	    background-color:  #f2f6f8;
	    padding-left:0px;
	    width:140px;
	    display: none;
	}
	.level2-menu:hover ul{
	    display: block;
	}
	.level2-menu ul li{
		position:relative;
	}
	.level2-menu ul li:hover{
		background-color:#edf3f7;
	}
	.main-footer{
		margin-left: 0px;
	}
	.title-head{
		width: 20px;
		height: 20px;
	}
</style>